home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
RINDEX.C
< prev
next >
Wrap
C/C++ Source or Header
|
1984-07-29
|
409b
|
22 lines
/* rindex.c - find last occurrence of character in string.
(C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
G. R. Mansfield. 84/06/06.
Ver 1.0-4729.
*/
#include <defstd.h>
char *rindex(s, c) /* return pointer to last occurrence of c in s */
char *s, c; /* NULL if c is not in s */
{
char *p;
p = NULL;
while (*s) {
if (*s == c)
p = s;
s++;
}
return(p);
}